<?php
class model_helper {
	
	static function getAllDataFromArray($arrayOfObjects, $param1 = false, $param2 = false) {
		$ret = array();
		foreach($arrayOfObjects as $object) {
			if (is_object($object)) {
				if ($param1) {
					$ret[] = $object->getAll($param1, $param2);
				} else {
					$ret[] = $object->getAll();
				}
			}
		}
		return $ret;
	}

	static function getAllDataFromVideoArray($arrayOfVideos, $includeMeta = false, $getDynamicMeta = true, $addExtendedInfo = true) {
		$ret = array();
		foreach($arrayOfVideos as $video) {
			/* @var $video video */
			$ret[] = $video->getAll($includeMeta, $getDynamicMeta, $addExtendedInfo);
		}
		return $ret;
	}
	
}
?>